notebook: Destroy gadgets after chaining up
authorBenjamin Otte <otte@redhat.com>
Fri, 15 Jan 2016 11:58:14 +0000 (12:58 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 15 Jan 2016 15:22:22 +0000 (16:22 +0100)
While chaining up, we might still call into the notebook code. And that
code expects the gadgets to be there.

https://bugzilla.gnome.org/show_bug.cgi?id=760640

gtk/gtknotebook.c

index 203e2a89a4fc6b065aaf302cfff0145dca70ddb9..3b9f7d46434e9f407e8446fca0a4447ee47acb5f 100644 (file)
@@ -1811,14 +1811,14 @@ gtk_notebook_destroy (GtkWidget *widget)
       priv->source_targets = NULL;
     }
 
+  remove_switch_tab_timer (notebook);
+
+  GTK_WIDGET_CLASS (gtk_notebook_parent_class)->destroy (widget);
+
   g_clear_object (&priv->gadget);
   g_clear_object (&priv->header_gadget);
   g_clear_object (&priv->tabs_gadget);
   g_clear_object (&priv->stack_gadget);
-
-  remove_switch_tab_timer (notebook);
-
-  GTK_WIDGET_CLASS (gtk_notebook_parent_class)->destroy (widget);
 }
 
 static void